package com.semidata.trp.business.report;

import java.sql.Timestamp;

public class KeyWord {
	private String key1;
	private String key2;
	private String key3;
	private Timestamp time;
	
	public KeyWord() {
		key1 = null;
		key2 = null;
		key3 = null;
		this.time = new Timestamp(System.currentTimeMillis());
	}
	public KeyWord(String key1, String key2, String key3) {
		this.key1 = key1;
		this.key2 = key2;
		this.key3 = key3;
		this.time = new Timestamp(System.currentTimeMillis());
	}
	public String getKey1() {
		return key1;
	}
	public void setKey1(String key1) {
		this.key1 = key1;
	}
	public String getKey2() {
		return key2;
	}
	public void setKey2(String key2) {
		this.key2 = key2;
	}
	public String getKey3() {
		return key3;
	}
	public void setKey3(String key3) {
		this.key3 = key3;
	}
	public Timestamp getTime() {
		return time;
	}
	public void setTime(Timestamp time) {
		this.time = time;
	}
	public boolean equal(KeyWord kw) {
		return kw.getKey1().equals(key1) && kw.getKey2().equals(key2) && kw.getKey3().equals(key3);
	}
	
	public int hashCode() {
		return this.toString().hashCode();
	}
	
	public String toString() {
		return key1 + "-" + key2 + "-" + key3;
	}
}
